Learn R Programming

Compositional (version 5.4)

Tuning of the projection pursuit regression with compositional predictor variables: Tuning of the projection pursuit regression with compositional predictor variables

Description

Tuning of the projection pursuit regression with compositional predictor variables.

Usage

pprcomp.tune(y, x, nfolds = 10, folds = NULL, seed = FALSE, nterms = 1:10, type = "alr")

Arguments

y

A numerical vector with the continuous variable.

x

A matrix with the available compositional data, but zeros are not allowed.

nfolds

The number of folds to use.

folds

If you have the list with the folds supply it here.

seed

If seed is TRUE the results will always be the same.

nterms

The number of terms to try in the projection pursuit regression.

type

Either "alr" or "log" corresponding to the additive log-ratio transformation or the logarithm applied to the compositional predictor variables.

Value

A list including:

runtime

The run time of the cross-validation procedure.

mse

The mean squared error of prediction for each fold and number of terms.

Details

The function performs tuning of the projection pursuit regression algorithm with compositional predictor variables.

References

Friedman, J. H. and Stuetzle, W. (1981). Projection pursuit regression. Journal of the American Statistical Association, 76, 817-823. doi: 10.2307/2287576.

See Also

pprcomp, ice.pprcomp, alfapcr.tune, compppr.tune

Examples

Run this code
# NOT RUN {
x <- as.matrix(iris[, 2:4])
x <- x/ rowSums(x)
y <- iris[, 1]
mod <- pprcomp.tune(y, x)
# }

Run the code above in your browser using DataLab